package club.kingyin.kyblog.core.business.mapper;

import org.apache.ibatis.annotations.*;

import java.util.ArrayList;
import java.util.Set;

/**
 * @author : kingyins
 * @version : 1.0
 * @program : ky-blog
 * @description : 在此处添加类描述
 * @create : 2021年08月25日 13:59
 **/
@Mapper
public interface TypeMapper {

    @Select("select type from types")
    Set<String> selectTypes();

    @Update("update types set type = #{target} where type = #{sources,jdbcType=VARCHAR}")
    int updateType(String sources, String target);

    @Delete("delete from types where type = #{sources,jdbcType=VARCHAR}")
    int deleteType(String sources);

    int insert(@Param("types") ArrayList<String> types);
}
